import { Demo1Component } from './demo1/demo1.component';
import { Demo2Component } from './demo2/demo2.component';
import { ActionComponent } from './action/action.component';

export const AlertConfig = {
  location: 'Alert',
  description: '用于页面内的信息提示，分为普通、提示、成功、警告、错误五个级别。',
  description_en: 'Alert is used for information prompt on the page, which can be divided into default, info, success, warning and error.',
  component: [
    {
      demo: Demo1Component,
      codePath: 'showcase/alert/demo1/demo1.component',
      demoTitle: '基础',
      demoTitle_en: 'Basic',
      demoDescription: '基础的使用，默认可关闭。',
      demoDescription_en: 'Basic use, which can be turned off by default.',
    },
    {
      demo: Demo2Component,
      codePath: 'showcase/alert/demo2/demo2.component',
      demoTitle: '自定义',
      demoTitle_en: 'Custom',
      demoDescription: '提供灵活的配置和自定义。',
      demoDescription_en: 'Flexible configuration and customisation are provided.',
    },
    {
      demo: ActionComponent,
      codePath: 'showcase/alert/action/action.component',
      demoTitle: '操作',
      demoTitle_en: 'Action',
      demoDescription: '可以在右上角自定义操作项。',
      demoDescription_en: 'Action items can be customized in the upper right corner.',
    },
  ],
  selector: 'lv-alert',
  snippet: `<lv-alert lvType="\${1:success}">This is content ...</lv-alert>`,
  api: [
    {
      attribute: 'lvType',
      type: 'string',
      default: 'default',
      description: `提示信息的类型，可选值为 ('success' | 'info' | 'warning' | 'error' | 'default')。`,
      description_en: ``,
    },
    {
      attribute: 'lvClosable',
      type: 'boolean',
      default: 'true',
      description: `是否可关闭。`,
      description_en: `Whether can be turned off`,
    },
    {
      attribute: 'lvShowIcon',
      type: 'boolean',
      default: 'true',
      description: `是否显示左侧图标。`,
      description_en: `Whether to display icons on the left`,
    },
    {
      attribute: 'lvIcon',
      type: 'string | TemplateRef',
      default: 'null',
      description: `自定义图标，可通过 string 类型设置 svg 图标的 Symbol Id，也可通过 template 完全自定义。`,
      description_en: `Customised icon. The Symbol ID of SVG icon can be set through string type, or it can be fully customised through template.`,
    },
  ],
  event: [
    {
      event: 'lvClose',
      parameter: `--`,
      description: '关闭内嵌提示的回调函数。',
      description_en: `Turn off callback functions with embedded prompts.`,
    },
  ],
};
